package com.huawei.esdk.tp.device.smc;

import org.apache.log4j.Logger;

import com.huawei.esdk.platform.nemgr.base.MultiConnDeviceBase;
import com.huawei.esdk.platform.nemgr.itf.IDeviceConnection;
import com.huawei.esdk.tp.device.smc.v100r002c01.SMC20V1R2C01ConferenceControlCapabilityImpl;
import com.huawei.esdk.tp.device.smc.v100r002c01.SMC20V1R2C01ConferenceManagerCapabilityImpl;
import com.huawei.esdk.tp.device.smc.v100r002c01.SMC20V1R2C01IConferenceControlCapability;
import com.huawei.esdk.tp.device.smc.v100r002c01.SMC20V1R2C01IConferenceManagerCapability;
import com.huawei.esdk.tp.device.smc.v100r002c01.SMC20V1R2C01ISiteManagerCapability;
import com.huawei.esdk.tp.device.smc.v100r002c01.SMC20V1R2C01SiteManagerCapabilityImpl;

public class SMC20V1R2C01Device extends SMCDevice
{
    private static final Logger LOGGER = Logger
            .getLogger(MultiConnDeviceBase.class);

    public SMC20V1R2C01Device(String sap)
    {
        super(sap);
    }
    
    protected void prepareDeviceCapability()
    {
        LOGGER.debug("IN prepareDeviceCapability method");
        addServiceObjectMap(SMC20V1R2C01ISiteManagerCapability.class,
                new SMC20V1R2C01SiteManagerCapabilityImpl(this.cxfSOAPProtocolAdapter));
        addServiceObjectMap(SMC20V1R2C01IConferenceControlCapability.class,
                new SMC20V1R2C01ConferenceControlCapabilityImpl(this.cxfSOAPProtocolAdapter));
        addServiceObjectMap(SMC20V1R2C01IConferenceManagerCapability.class,
                new SMC20V1R2C01ConferenceManagerCapabilityImpl(this.cxfSOAPProtocolAdapter));
    }   
    
    @Override
    public IDeviceConnection createConnection(String appId, String sap, String user, String pwd)
    {
        return new SMC20V1R2C01Connection(cxfSOAPProtocolAdapter, this, user, pwd, buildAuthorizePolicy());
    }
}